import java.util.*;

public class MinMaxTree<T> {
	
	private MinMaxNode<T> rootNode;

    public MinMaxTree(T data, int dimensions, int turn) 
    {
    	List defaultMove = new ArrayList(4);
    	MinMaxNode aNode = new MinMaxNode(data, defaultMove, 2, turn);
    	rootNode = aNode;
    }
    public void addChild(MinMaxNode aChild)
    {
    	rootNode.addChild(aChild);
    }
    public MinMaxNode getRootNode()
    {
    	return rootNode;
    }
    public void updateRootNode(MinMaxNode<T> _rootNode)
    {
    	rootNode = _rootNode;
    }
    public int getDepth(T state)
    {
    	return rootNode.getDepth(state, 0);
    }
}